<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>

<%@include file="/common/head.jsp" %>

<c:set var="module" value="product"/>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
		<form action="${ctx }/admin/product/doReview?id=${n.id }" id="detail-form" class="form-horizontal" method="post" onsubmit="return save()">
			<div id="specification"></div>
			
			<div class="form-group">
                 <label class="col-sm-2 control-label">商品名称</label>
                 <div class="col-sm-10">
                 	<input type="text" class="form-control" name="name" readonly="readonly" value="${n.name }">
                 </div>
             </div>	
			<div class="form-group">
                 <label class="col-sm-2 control-label">审核状态</label>
                 <div class="col-sm-10">
                 	${enum:detail('ProductStatus', 'status', n.status) }
                 </div>
             </div>
		</form>
</div>

<%@include file="/common/foot.jsp" %>

<script>
	$('.summernote').summernote({
	  airMode: false,
	  lang: 'zh-CN',
	  height: 300,
	  callbacks: {
	    onChange: function(contents, $editable) {
	      save();
	    }
	  }
	});
	
	function save() {
		var html = $('.summernote').summernote('code');
	  	$('#details').val(html);	  
	  	return true;
	}
	
	$(document).ready(function() {
		init_images('image1');
		init_images('image2');
	});
</script>
</body>
</html>
